package cn.cool.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author LiuH
 * @since 2021-01-23
 */
@TableName("cool_article")
public class Article implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 文章id
     */
    @TableId(value = "art_id", type = IdType.AUTO)
        private Integer artId;

    /**
     * 文章标题
     */
    private String artTitle;

    /**
     * 文章内容
     */
    private String artContent;

    /**
     * 文章作者 user_id
     */
    private Integer authorId;

    /**
     * 点击量
     */
    private Integer artHit;

    /**
     * 文章类型
     */
    private Integer artCategoryId;

    /**
     * 权重 数值越小 越靠前
     */
    private Integer priority;

    /**
     * 是否删除 0:未删除 1:已删除
     */
    @TableLogic
    private Boolean isDeleted;

    /**
     * 创建时间
     */
    private Date gmtCreate;

    /**
     * 修改时间
     */
    private Date gmtModified;

    /**
     * 作者信息
     */
    private User user;

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public Integer getArtId() {
        return artId;
    }

    public void setArtId(Integer artId) {
        this.artId = artId;
    }

    public String getArtTitle() {
        return artTitle;
    }

    public void setArtTitle(String artTitle) {
        this.artTitle = artTitle;
    }

    public String getArtContent() {
        return artContent;
    }

    public void setArtContent(String artContent) {
        this.artContent = artContent;
    }

    public Integer getAuthorId() {
        return authorId;
    }

    public void setAuthorId(Integer authorId) {
        this.authorId = authorId;
    }

    public Integer getArtHit() {
        return artHit;
    }

    public void setArtHit(Integer artHit) {
        this.artHit = artHit;
    }

    public Integer getArtCategoryId() {
        return artCategoryId;
    }

    public void setArtCategoryId(Integer artCategoryId) {
        this.artCategoryId = artCategoryId;
    }

    public Integer getPriority() {
        return priority;
    }

    public void setPriority(Integer priority) {
        this.priority = priority;
    }

    public Boolean getIsDeleted() {
        return isDeleted;
    }

    public void setIsDeleted(Boolean isDeleted) {
        this.isDeleted = isDeleted;
    }

    public Date getGmtCreate() {
        return gmtCreate;
    }

    public void setGmtCreate(Date gmtCreate) {
        this.gmtCreate = gmtCreate;
    }

    public Date getGmtModified() {
        return gmtModified;
    }

    public void setGmtModified(Date gmtModified) {
        this.gmtModified = gmtModified;
    }

    @Override
    public String toString() {
        return "Article{" +
                "artId=" + artId +
                ", artTitle='" + artTitle + '\'' +
                ", artContent='" + artContent + '\'' +
                ", authorId=" + authorId +
                ", artHit=" + artHit +
                ", artCategoryId=" + artCategoryId +
                ", priority=" + priority +
                ", isDeleted=" + isDeleted +
                ", gmtCreate=" + gmtCreate +
                ", gmtModified=" + gmtModified +
                ", user=" + user +
                '}';
    }
}
